<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
	</head>

	<body>
		<div class="mui-off-canvas-wrap mui-draggable">

			<!-- 主页面容器 -->
			<div class="mui-inner-wrap" id="zhurongqi">
				<!-- 主页面标题 -->
				<header class="mui-bar mui-bar-nav">
					<a class="mui-icon  mui-icon-back mui-pull-left" id="madan"></a>
					<h1 class="mui-title" id='shouji'>全部笔记</h1>
				</header>




				<div class="mui-content mui-scroll-wrapper">
					<div class="mui-scroll">

					</div>
				</div>


				<nav class="mui-bar mui-bar-tab">
					<a class="mui-tab-item mui-active" id='biji'>
						<span class="mui-icon mui-icon-compose"></span>
						<span class="mui-tab-label" style="font-weight: 800;">笔记</span>
					</a>
					<a class="mui-tab-item" id='daiban'>
						<span class="mui-icon mui-icon-close"></span>
						<span class="mui-tab-label" style="font-weight: 800;">待办</span>
					</a>
				</nav>
			</div>
		</div>
           
           <script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
        	mui.init()
        </script>
		<script type="text/javascript" charset="utf-8">
			mui.plusReady(function() {

				var biji = plus.webview.create('biji.html', 'biji.html', {
					top: '43px',
					bottom: '50px'
				}, {

				});

				var daiabn = plus.webview.create('daiban.html', 'daiban.html', {
					top: '43px',
					bottom: '50px'
				});

				var richeng = plus.webview.currentWebview();

				richeng.append(biji);
				richeng.append(daiabn);

				biji.show();
				daiabn.hide();
				var x = 0;

				document.getElementById("biji").addEventListener("tap", function() {
					if (x == 0) {


					} else {
						biji.show();
						daiabn.hide();
						x = 0;
						document.getElementById('shouji').innerHTML = '全部笔记';
					}


				});

				document.getElementById("daiban").addEventListener("tap", function() {

					if (x == 0) {
						daiabn.show();
						biji.hide();
						x = 1;
						document.getElementById('shouji').innerHTML = '全部待办';
					}

				});


				document.getElementById('madan').addEventListener('tap', function() {
              var self = plus.webview.create("gongneng.html","gongneng.html");
				 self.show();
				 var x = plus.webview.currentWebview();
				 x.close();
				});
				//首页返回键处理
				//处理逻辑：1秒内，连续两次按返回键，则进入后台；
				var first = null;
				mui.back = function() {
					//首次按键，提示‘再按一次退出应用’
					if (!first) {
						first = new Date().getTime();
						mui.toast('再按一次切换后台,到时将提醒您');
						setTimeout(function() {
							first = null;
						}, 1000);
					} else {
						if (new Date().getTime() - first < 1000) {
							var main = plus.android.runtimeMainActivity();
							main.moveTaskToBack(false);
						}
					}
				};




			})
		</script>
	</body>

</html>
